home *** CD-ROM | disk | FTP | other *** search
/ X User Tools / X User Tools (O'Reilly and Associates)(1994).ISO / sun4c / archive / tcltk.z / tcltk / man / catn / while.n < prev    next >
Text File  |  1994-09-20  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4. while(n)              Tcl Built-In Commands
  5.  
  6.  
  7.  
  8. _________________________________________________________________
  9.  
  10. NAME
  11.      while - Execute script repeatedly as long as a condition  is
  12.      met
  13.  
  14. SYNOPSIS
  15.      while _t_e_s_t _b_o_d_y
  16. _________________________________________________________________
  17.  
  18.  
  19. DESCRIPTION
  20.      The _w_h_i_l_e command evaluates _t_e_s_t as an  expression  (in  the
  21.      same  way  that  expr evaluates its argument).  The value of
  22.      the expression must a proper boolean value; if it is a  true
  23.      value  then _b_o_d_y is executed by passing it to the Tcl inter-
  24.      preter.  Once _b_o_d_y has been executed then _t_e_s_t is  evaluated
  25.      again,  and the process repeats until eventually _t_e_s_t evalu-
  26.      ates to a false boolean value.   Continue  commands  may  be
  27.      executed  inside  _b_o_d_y to terminate the current iteration of
  28.      the loop, and break commands may be executed inside _b_o_d_y  to
  29.      cause immediate termination of the while command.  The while
  30.      command always returns an empty string.
  31.  
  32.  
  33. KEYWORDS
  34.      boolean value, loop, test, while
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Tcl                                                             1
  64.  
  65.  
  66.  
  67.